<?php

use Illuminate\Support\Facades\Storage;

if (! function_exists('file_url')) {
    function file_url(?string $file = ''): string
    {
        return $file && Storage::exists($file) ? Storage::url($file) : asset('img/loading_h.png');
    }
}
